<template>
	<div class='Content'>
		<h2>{{name}}</h2>
		<ul>
			<li v-for="(item , index) of things" :key="index">{{item.title}}</li>
		</ul>
	</div>
</template>

<script>
export default {
	name: 'HomeContent',
	data () {
		return {
			name: '',
			things: []
		}
	},
	mounted () {
		var _this = this
		this.$ajax.get('../../static/data.json')
		.then(function (res) {
			_this.name = res.data.name
			_this.things = res.data.things
		})
		.catch(function (res) {
			console.log(res)
		})
	}
}
</script>

<style lang='stylus'>
	.Content
		font-size: 16px
		color: red
		width: 100%
		height: 90px
</style>
